package bag.config;

import com.mchange.v2.c3p0.ComboPooledDataSource;
import com.mysql.jdbc.Connection;

import javax.sql.DataSource;
import java.sql.SQLException;

/**
 * Created by 冷 on 2017/9/19.
 */
public class C3P0Utils {
    public static ComboPooledDataSource cpds = null;
    static {
        cpds = new ComboPooledDataSource("zjitc");
    }
//    public static Connection getConnection() throws SQLException {
//        return  cpds.getConnection();
//    }
    public static ComboPooledDataSource getDataSources()
    {
        return cpds;
    }

//    public static DataSource ds = null;
//    static {
//        ds = new ComboPooledDataSource();
//    }
//    public static DataSource getDataSource(){
//        return ds;
//    }

}
